/// <reference name="MicrosoftAjax.js" />
/// <reference name="dnn.js" assembly="DotNetNuke.WebUtility" />
/// <reference name="dnn.xmlhttp.js" assembly="DotNetNuke.WebUtility" />

Type.registerNamespace('OliverHine');
    
OliverHine.ViewWorkflow = function()
{
    //Call Base Method
    OliverHine.ViewWorkflow.initializeBase(this);
    //Member Variables
    this._msgs = {};
    this._helloButton = null;

    //Associated delegates to single member variable dictionary to make it easy to dispose
    this._delegates = {
        _onLoadDelegate: Function.createDelegate(this, this._onLoad),
        componentPropChangedDelegate: Function.createDelegate(this, this._onPropChanged)
        };

    //Event Hookup
    Sys.Application.add_load(this._delegates._onLoadDelegate);
}

OliverHine.ViewWorkflow.prototype =
{
    //Properties
    get_ns: function() {return this.get_id() + '_';},
    get_msgs: function() {return this._msgs;},
    set_msgs: function(value) {this._msgs = value;},

    //Events
    initialize: function() 
    {
        //Call Base Method    
        OliverHine.ViewWorkflow.callBaseMethod(this, 'initialize');
        

    },

    _onLoad: function(src, arg)
    {
        
    },

    //Methods
    getMessage: function(key)
    {
        return this._msgs[key];
    },

    showMessage: function(msg)
    {
        $get(this.get_ns() + 'lblResponse').innerHTML = msg;
    },
    
    //Private Methods
    _createChildControl: function(id, tag, type)
    {
        var ctl = document.createElement(tag);
        ctl.id = this.get_ns() + id;
        if (type)
            ctl.type = type;
        return ctl;
    },

    _displayWait: function(show)
    {
        $get(this.get_ns() + 'imgAjax').className = (show ? '' : 'ceHidden');
    },

    dispose: function()
    {
        this._delegates = null;
        OliverHine.ViewWorkflow.callBaseMethod(this, 'dispose');
    }
}

//register class and inherit from Sys.Component
OliverHine.ViewWorkflow.registerClass('OliverHine.ViewWorkflow', Sys.Component);
